<template>
    <div class="container">
        <van-form @submit="onSubmit">
            <div class="qiye-info">
                <div class="title">单位信息</div>
                  <van-cell-group inset>
                     <van-field
                    v-model="form.uscc"
                    name="uscc"
                    label="信用代码："
                    placeholder="请输入信用代码"
                    required
                    :rules="[{ required: true, message: '请输入信用代码' }]"
                    @change="usccChange"
                    />
                    <van-field
                    v-model="form.companyName"
                    name="companyName"
                    label="单位名称："
                    placeholder="请输入单位名称"
                    required
                    :rules="[{ required: true, message: '请输入单位名称' }]"
                    />
                    <van-field
                    v-model="form.legalPerson"
                    name="legalPerson"
                    label="法人代表："
                    placeholder="请输入法人代表"
                    required
                    :rules="[{ required: true, message: '请输入法人代表' }]"
                    /> 
                    
                     <van-field
                    v-model="companyStatusValue"
                    is-link
                    readonly
                    label="经营状态："
                    placeholder="请选择经营状态"
                    @click="showPicker1 = true"
                    required
                    :rules="[{ required: true, message: '请选择经营状态' }]"
                    />
                    <van-popup v-model:show="showPicker1" round position="bottom">
                      <van-picker
                          :columns="companyStatusList"
                          @cancel="showPicker1 = false"
                          @confirm="onConfirm1"
                      />
                    </van-popup> 

                     <van-field
                    v-model="companyTypeValue"
                    is-link
                    readonly
                    label="企业类型："
                    placeholder="请选择企业类型"
                    @click="showPicker2 = true"
                    required
                    :rules="[{ required: true, message: '请选择企业类型' }]"
                    />
                    <van-popup v-model:show="showPicker2" round position="bottom">
                      <van-picker
                          :columns="companyTypeList"
                          @cancel="showPicker2 = false"
                          @confirm="onConfirm2"
                      />
                    </van-popup> 

                    <van-field
                    v-model="companyIndustryValue"
                    is-link
                    readonly
                    label="所属行业："
                    placeholder="请选择所属行业"
                    @click="showPicker3 = true"
                    required
                    :rules="[{ required: true, message: '请选择所属行业' }]"
                    />
                    <van-popup v-model:show="showPicker3" round position="bottom">
                    <van-picker
                        :columns="companyIndustryList"
                        @cancel="showPicker3 = false"
                        @confirm="onConfirm3"
                    />
                    </van-popup> 
  
                  <van-field
                    v-model="form.registeredCapital"
                    name="registeredCapital"
                    label="注册资本："
                    placeholder="请输入注册资本"
                    type="number"
                    required
                    :rules="[{ required: true, message: '请输入注册资本' }]"
                    >
                    <template #button>
                        <div size="small" type="primary">万元</div>
                      </template>
                    </van-field> 
                  </van-cell-group>
            </div>

            <div class="qiye-info2">
              <div class="title">联系人信息</div>
                <van-cell-group inset>
                <van-field
                  v-model="form.talent_company_apply_contact_info.name"
                  name="talent_company_apply_contact_info.name"
                  label="姓名："
                  placeholder="请输入姓名"
                  required
                  :rules="[{ required: true, message: '请输入姓名' }]"
                  /> 
                  <van-field
                  v-model="sexValue"
                  is-link
                  readonly
                  label="性别："
                  placeholder="请选择性别"
                  @click="showPicker4 = true"
                  required
                  :rules="[{ required: true, message: '请选择性别' }]"
                />
                <van-popup v-model:show="showPicker4" round position="bottom">
                  <van-picker
                    :columns="sexList"
                    @cancel="showPicker4 = false"
                    @confirm="onConfirm4"
                  />
                </van-popup> 

              <van-field
                  v-model="form.talent_company_apply_contact_info.phone"
                  name="talent_company_apply_contact_info.phone"
                  label="手机号："
                  placeholder="请输入手机号"
                  required
                  readonly
                  :rules="[{ required: true, message: '请输入手机号' }]"
                  />
                  <van-field
                  v-model="form.talent_company_apply_contact_info.job"
                  name="talent_company_apply_contact_info.job"
                  label="职务："
                  placeholder="请输入职务"
                  required
                  :rules="[{ required: true, message: '请输入职务' }]"
                  />
                  <van-field
                  v-model="form.talent_company_apply_contact_info.email"
                  name="talent_company_apply_contact_info.email"
                  label="电子邮箱："
                  placeholder="请输入电子邮箱"
                  required
                  :rules="[{ required: true, message: '请输入电子邮箱' }]"
                  /> 
                </van-cell-group> 
            </div>

            <div class="qiye-info2"  v-for="(item,index) in talent_company_apply_person_info" :key="index">
              <div class="talent-title">
                <div class="titleinfo">人才信息</div>
                <div class="deletebtn" v-if="index > 0" @click="del(index)">删除</div>
              </div>
              <van-cell-group inset>  
                <van-field
                  v-model="item.idCard"
                  :name="`item[${index}].idCard`"
                  label="身份证号："
                  placeholder="请输入身份证号"
                  required
                  :rules="[{ required: true, message: '请输入身份证号' }]"
                  @change="idCardChange(index)"
                  />
                  <van-field
                  v-model="item.name"
                  :name="`item[${index}].name`"
                  label="姓名："
                  placeholder="请输入姓名"
                  required
                  :rules="[{ required: true, message: '请输入姓名' }]"
                  />
                  <van-field
                  v-model="item.phone"
                  :name="`item[${index}].phone`"
                  label="手机号："
                  placeholder="请输入手机号"
                  required
                  :rules="[{ required: true, message: '请输入手机号' }]"
                  />
                  <van-field
                    v-model="item.job"
                    :name="`item[${index}].job`"
                    label="职务："
                    placeholder="请输入职务"
                    required
                    :rules="[{ required: true, message: '请输入职务' }]"
                    />

                   <van-field
                      v-model="item.jobNatureValue"
                      is-link
                      readonly
                      label="职位性质："
                      placeholder="请选择职位性质"
                      @click="showPickerZwxz = true"
                      required
                      :rules="[{ required: true, message: '请选择职位性质' }]"
                    />
                    <van-popup v-model:show="showPickerZwxz" round position="bottom">
                      <van-picker
                          :columns="jobNatureList"
                          @cancel="showPickerZwxz = false"
                          @confirm="onConfirmjobNature(index, $event)"
                      />
                    </van-popup> 

                   <van-field
                    v-model="item.xlValue"
                    is-link
                    readonly
                    label="最高学历："
                    placeholder="请选择最高学历"
                    @click="showPickerEdu = true"
                    required
                    :rules="[{ required: true, message: '请选择最高学历' }]"
                    />
                    <van-popup v-model:show="showPickerEdu" round position="bottom">
                      <van-picker
                          :columns="xlList"
                          @cancel="showPickerEdu = false"
                          @confirm="onConfirmEdu(index, $event)"
                      />
                    </van-popup>  

                    <div class="addapplybtn">
                      <van-button class="apply" type="primary" @click="addTanlentInfo">新增</van-button>
                    </div>
              </van-cell-group>
            </div>

            <div class="qiye-info3">
                <div class="title2">其他</div>
                <van-field
                class="remark"
                type="textarea"
                :rows="6"
                v-model="form.remark"
                name="remark"
                label=""
                placeholder="请输入"
                />
            </div>

            <div class="addbtn">
                <van-button color='#1052CC' block type="primary" native-type="submit">
                确定
                </van-button>
            </div>
        </van-form>
    </div>
  </template>
  
  <script setup>
  import { ref,reactive,onMounted,computed } from 'vue';
  import { useRouter,useRoute } from 'vue-router';
  import { showToast } from 'vant';
  import { getDictSelect, getOrigin,companyApply,getTalentCompanyApplyInfo,getPublicCompanyInfo,getPublicPersonInfo,getRegionName } from '@/api/company';
  
  const router = useRouter()
  const route = useRoute();

  async function getThDetail() {
  const id = route.query.id || '';
  console.log('applyId:',id);
  if(id){
    const { code, data } = await getTalentCompanyApplyInfo(id);
    if(code === 200) {
    form.uscc = data.uscc
    form.companyName = data.companyName
    form.legalPerson = data.legalPerson
    form.companyStatus = data.companyStatus
    companyStatusValue.value = data.companyStatusLabel
    companyTypeValue.value = data.companyTypeLabel
    form.companyType = data.companyType
    companyTypeValue.value = data.companyTypeLabel
    form.companyType = data.companyType
    companyIndustryValue.value = data.companyTypeLabel
    form.companyIndustry = data.companyIndustry
    form.registeredCapital = data.registeredCapital
    // form.talent_company_apply_contact_info.value = form.talent_company_apply_contact_info
    form.talent_company_apply_contact_info.name = data.talent_company_apply_contact_info.name
    form.talent_company_apply_contact_info.sex = data.talent_company_apply_contact_info.sex
    let picksex = []
    picksex = sexList.filter(s =>{
      return s.value == data.talent_company_apply_contact_info.sex
    })
    sexValue.value = picksex[0].text
    form.talent_company_apply_contact_info.phone = data.talent_company_apply_contact_info.phone
    form.talent_company_apply_contact_info.job = data.talent_company_apply_contact_info.job
    form.talent_company_apply_contact_info.email = data.talent_company_apply_contact_info.email

    form.talent_company_apply_person_info = JSON.parse(JSON.stringify(data.talent_company_apply_person_info.value))
    
    }
  }
}

const usccChange = (event) => {
  console.log('uscc输入内容变化了：', event.target.value);
  console.log('form.uscc:',form.uscc);
  getInfoPublicCompany()
}

const getInfoPublicCompany = async () => {
  const { code,data }= await getPublicCompanyInfo({
    uscc: form.uscc
  });
  if(code === 200){
    console.log('dataaaaaa:',data.data.list[0]);
    if (data.data.list[0].CREDIT !== null) {
      form.creditRating = data.data.list[0].CREDIT
    }
    if (data.data.list[0].FARE_TERM_START !== null) {
      form.startDate = data.data.list[0].FARE_TERM_START
    }
    if (data.data.list[0].FARE_TERM_END !== null) {
      form.endDate = data.data.list[0].FARE_TERM_END
    }
    if (data.data.list[0].CORP_NAME !== null) {
      form.companyName = data.data.list[0].CORP_NAME
    }
    if (data.data.list[0].OPER_MAN_NAME !== null) {
      form.legalPerson = data.data.list[0].OPER_MAN_NAME
    }
    if (data.data.list[0].WEB_URL !== null) {
      form.website = data.data.list[0].WEB_URL
    }
    if (data.data.list[0].ADDR !== null) {
      form.registeredAddress = data.data.list[0].ADDR
    }
    if (data.data.list[0].BELONG_ORG !== null) {
      form.registrationAuthority = data.data.list[0].BELONG_ORG
    }
    if (data.data.list[0].REG_CAPI !== null) {
      form.registeredCapital = Number(data.data.list[0].REG_CAPI) / 10000
    }
    if (data.data.list[0].FACT_CAPI !== null) {
      form.paidCapital = Number(data.data.list[0].FACT_CAPI) / 10000
    }
    if (data.data.list[0].FAX !== null) {
      form.fax = data.data.list[0].FAX
    }
    if (data.data.list[0].TEL !== null) {
      form.phone1 = data.data.list[0].TEL
    }
    if (data.data.list[0].CONNECT_TEL !== null) {
      form.phone2 = data.data.list[0].CONNECT_TEL
    }
    if (data.data.list[0].EMAIL !== null) {
      form.email = data.data.list[0].EMAIL
    }
    if (data.data.list[0].corp_status !== null) {
      companyStatusValue.value = data.data.list[0].corp_status

      let pickCompanyStatus = []
      pickCompanyStatus = companyStatusList.filter(s =>{
        return s.text == companyStatusValue.value
      })
      companyIndustryId.value = pickCompanyStatus[0].value
      console.log('companyIndustryId.value:',companyIndustryId.value);
    }
    if (data.data.list[0].BELONG_TRADE !== null) {
      companyIndustryValue.value = data.data.list[0].BELONG_TRADE

      let pickCompanyIndustry = []
      pickCompanyIndustry = companyIndustryList.filter(s =>{
        return s.text == companyIndustryValue.value
      })
      companyIndustryId.value = pickCompanyIndustry[0].value
      console.log('companyIndustryId.value:',companyIndustryId.value);
    }
  }
}

const personIdcard = ref('')
const idCardChange = (index) => {
  console.log('idCardChange-index:',index);
  personIdcard.value = talent_company_apply_person_info.value[index].idCard
  console.log('personIdcard.value:',personIdcard.value);
  getInfoPublicPerson(index)
}

const getInfoPublicPerson = async (index) => {
  const { code,data } = await getPublicPersonInfo({
    idCard: personIdcard.value
  });
  if(code === 200){
    console.log('dataaaaaa:',data.data.list[0]);
    if (data.data.list[0].nation !== null) {
      talent_company_apply_person_info.value[index].nation = data.data.list[0].nation
    }
    if (data.data.list[0].sex !== null) {
      talent_company_apply_person_info.value[index].sex = data.data.list[0].sex
    }
    if (data.data.list[0].name !== null) {
      talent_company_apply_person_info.value[index].name = data.data.list[0].name
    }
    if (data.data.list[0].type !== null) {
      if(data.data.list[0].type == 'F1' || data.data.list[0].type == 'F2'){
        data.data.list[0].type = "F"
      }
      talent_company_apply_person_info.value[index].eduLevel = data.data.list[0].type
    }
    if (data.data.list[0].province !== null) {
      getRegionNameInfo(data.data.list[0].province)
      talent_company_apply_person_info.value[index].province = regioname.value
      console.log('talent_company_apply_person_info.value[index].province:',regioname.value);
    }
    if (data.data.list[0].city !== null) {
      getRegionNameInfo(data.data.list[0].city)
      talent_company_apply_person_info.value[index].city = regioname.value
      console.log('talent_company_apply_person_info.value[index].city:',regioname.value);
    }
    if (data.data.list[0].work_title !== null) {
      talent_company_apply_person_info.value[index].postTitle = data.data.list[0].work_title
    }
    if (data.data.list[0].permanent_address !== null) {
      talent_company_apply_person_info.value[index].residentialAddress = data.data.list[0].permanent_address
    }
    if (data.data.list[0].phone !== null) {
      talent_company_apply_person_info.value[index].phone = data.data.list[0].phone
    }
    if (data.data.list[0].email !== null) {
      talent_company_apply_person_info.value[index].email = data.data.list[0].email
    }
    if (data.data.list[0].edu !== null) {
      talent_company_apply_person_info.value[index].eduBackground = data.data.list[0].edu

      let pickEdu = []
      pickEdu = xlList.filter(s =>{
        return s.value == data.data.list[0].edu
      })
      talent_company_apply_person_info.value[index].xlValue = pickEdu[0].text
    }
  }
}

const regioname = ref('')
const getRegionNameInfo= async (regionName) => {
  const { data } = await getRegionName({
    name: regionName
  });
  console.log('region-res:::',res);
}

  const companyStatusList = [];
  const getCompanyStatusList = () => {
  getDictSelect('talent_company_status').then(res => {
    const {code,data} = res
    if(code === 200){
        data.forEach(item=>{
          companyStatusList.push({
            text: item.fullName,
            value: item.enCode
        })
        console.log('companyStatusList:',companyStatusList);
      })
    }
  })
  }
  const showPicker1 = ref(false);
  const companyStatusId = ref('')
  const companyStatusValue = ref('')
  const onConfirm1 = ({ selectedOptions }) => {
    showPicker1.value = false;
    companyStatusValue.value = selectedOptions[0]?.text;
    companyStatusId.value = selectedOptions[0]?.value;
  };

  const companyTypeList = [];
  const getCompanyTypeList = () => {
  getDictSelect('talent_company_type').then(res => {
    const {code,data} = res
    if(code === 200){
        data.forEach(item=>{
          companyTypeList.push({
            text: item.fullName,
            value: item.enCode
        })
        console.log('companyTypeList:',companyTypeList);
      })
    }
  })
  }
  const showPicker3 = ref(false);
  const companyIndustryId = ref('')
  const companyIndustryValue = ref('')
  const onConfirm3 = ({ selectedOptions }) => {
    showPicker3.value = false;
    companyIndustryValue.value = selectedOptions[0]?.text;
    companyIndustryId.value = selectedOptions[0]?.value;
  };

  const companyIndustryList = [];
  const getCompanyIndustryList = () => {
  getDictSelect('talent_company_profession').then(res => {
      const {code,data} = res
      if(code === 200){
          data.forEach(item=>{
            companyIndustryList.push({
              text: item.fullName,
              value: item.enCode
          })
          console.log('companyIndustryList:',companyIndustryList);
        })
      }
    })
  }
  const showPicker2 = ref(false);
  const companyTypeId = ref('')
  const companyTypeValue = ref('')
  const onConfirm2 = ({ selectedOptions }) => {
    showPicker2.value = false;
    companyTypeValue.value = selectedOptions[0]?.text;
    companyTypeId.value = selectedOptions[0]?.value;
  };

  const sexList = [];
  const getSexList = () => {
  getDictSelect('sex').then(res => {
    const {code,data} = res
    if(code === 200){
        data.forEach(item=>{
        sexList.push({
          text: item.fullName,
          value: item.enCode
        })
      })
    }
  })
  }
  const showPicker4 = ref(false);
  const sexId = ref('')
  const sexValue = ref('')
  const onConfirm4 = ({ selectedOptions }) => {
    showPicker4.value = false;
    sexValue.value = selectedOptions[0]?.text;
    sexId.value = selectedOptions[0]?.value;
  };


  //职位性质
  const jobNatureList = [];
const getjobNatureList = () => {
getDictSelect('talent_person_job_nature').then(res => {
  const {code,data} = res
  if(code === 200){
      data.forEach(item=>{
        jobNatureList.push({
        text: item.fullName,
        value: item.enCode
      })
    })
  }
})
}
const showPickerZwxz = ref(false);
const onConfirmjobNature = (index,{selectedOptions}) => {
  console.log('index:',index);
  console.log('selectedOptions:',selectedOptions);
  showPickerZwxz.value = false;
  talent_company_apply_person_info.value[index].jobNatureValue = selectedOptions[0]?.text;
  talent_company_apply_person_info.value[index].jobNature = selectedOptions[0]?.value;
};

//学位
const xlList = [];
const getXlList = () => {
getDictSelect('talent_person_edu').then(res => {
  const {code,data} = res
  if(code === 200){
      data.forEach(item=>{
      xlList.push({
        text: item.fullName,
        value: item.enCode
      })
    })
  }
})
}
const showPickerEdu = ref(false);
const onConfirmEdu = (index,{ selectedOptions }) => {
  showPickerEdu.value = false;
  talent_company_apply_person_info.value[index].xlValue = selectedOptions[0]?.text;
  talent_company_apply_person_info.value[index].eduBackground = selectedOptions[0]?.value;
};

  
  const form = reactive({
    uscc: '',
    companyName: '',
    legalPerson: '',
    companyType: '',
    registeredCapital: '',
    remark: '',
    creditRating: '',
    startDate: '',
    endDate: '',
    website: '',
    registeredAddress: '',
    registrationAuthority: '',
    paidCapital: '',
    fax: '',
    phone1: '',
    phone2: '',
    email: '',
    
    talent_company_apply_contact_info: {
        name: '',
        sex: '',
        phone: '',
        job: '',
        email: '',
    },
    talent_company_apply_person_info: [{
      idCard: '',
      name: '',
      phone: '',
      job: '',
    }]
  })

  form.talent_company_apply_contact_info.phone = localStorage.getItem('mobilePhone');

const talent_company_apply_person_info = ref([{
  idCard: '',
  name: '',
  phone: '',
  job: '',
}]);

  const addTanlentInfo = () =>{
  talent_company_apply_person_info.value.push({
    idCard: '',
    name: '',
    phone: '',
    job: '',
  })
}

// 删除
const del = (index) => {
  talent_company_apply_person_info.value.splice(index,1)
}
//判断人才数组是否含有两硕
function hasTwoObjectsWithValue(arr, key, value) {
  let count = 0;
  for (let i = 0; i < arr.length; i++) {
    if (arr[i][key] === value) {
      count++;
    }
  }
  return count > 1;
}

  const formSubmit = () => {
    // 判断: 是否有至少两个对象的eduBackground属性为02,即至少两个硕士
    const hasTwo = hasTwoObjectsWithValue(talent_company_apply_person_info.value, 'eduBackground', '12');
    console.log(hasTwo);
    // 判断数组中是否存在eduBackground为03的对象(即一个博士)
    let valueExists = talent_company_apply_person_info.value.some(obj => obj.eduBackground === '11');
    console.log(valueExists);
    
    if(!(hasTwo || valueExists)){
      //不具备 两硕或一博
      showToast('人才信息不具备两硕一博的条件,请重新录入')
      console.log('人才信息不具备两硕一博的条件');
      return
    }else{
    let { uscc,companyName,legalPerson,registeredCapital,remark,creditRating,startDate,endDate,website,registeredAddress,registrationAuthority,paidCapital,fax,phone1,phone2,email } = form;
    const params = {
      applyPhone: localStorage.getItem('mobilePhone'),
      uscc,
      companyName,
      legalPerson,
      remark,
      creditRating,
      startDate,
      endDate,
      website,
      registeredAddress,
      registrationAuthority,
      paidCapital,
      fax,
      phone1,
      phone2,
      email,
      companyStatus: companyStatusId.value,
      companyType: companyTypeId.value,
      companyIndustry: companyIndustryId.value,
      registeredCapital,
      talent_company_apply_contact_info: {
        name: form.talent_company_apply_contact_info.name,
        sex: sexId.value,
        phone: form.talent_company_apply_contact_info.phone,
        job: form.talent_company_apply_contact_info.job,
        email: form.talent_company_apply_contact_info.email
      },
      talent_company_apply_person_info: JSON.parse(JSON.stringify(talent_company_apply_person_info.value))
  }
  console.log('params11111:',params);
  companyApply(params).then((res) => {
    console.log('companyApply:',res);
    const {code,data} = res
    if (code === 200) {
      console.log('');
    } else {
      showToast(res.msg)
    }
  }).catch((err) => {
      console.log(err)
    })
  }
}

  const onSubmit = (values) => {
    console.log('values:',values);
    formSubmit()
  }
  
  onMounted(() => {
    getCompanyStatusList()
    getCompanyTypeList()
    getCompanyIndustryList()
    getSexList()
    getjobNatureList()
    getXlList()

    setTimeout(()=>{
      getThDetail()
    },1000)
  })
  </script>
  
  <style lang="scss" scoped>
  .container {
  background: #f9f9f9;
  overflow: hidden;
  margin-bottom: 6.6rem;
  padding: 0.9rem 1.3rem;
  }
  .navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #fff;
  }
  .addbtn{
    position: fixed;
    bottom: 2rem;
    width: 92%;
    left: 4%;
  }
  .van-form{
    padding: 1.4rem 0 0 0;
  }
  .van-cell-group{
    background: #fff;
  }
  .van-field{
    border-bottom: 1px solid #E0E0E4;
    padding: 2rem 0 1.6rem;
  }
  .title{
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 1.5rem 1.2rem;
  }
  .qiye-info,.qiye-info2,.qiye-info3{
    background: #fff;
    padding-top: 1.2rem;
  }
  .qiye-info2{
    margin: 2rem 0;
    position: relative;
  }
  .qiye-info3{
    padding: 1.2rem;
    
  }
  .title2{
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;

  }
  .dialog-qiye-info2{
    background: #fff;
    padding-top: 1.5rem;
  }
  .dialog-title{
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 0 1.2rem;
  }
  .qita{
    margin-top: 2rem;
    padding: 1.2rem;
    background: #fff;
    margin-bottom: 2.6rem;
  }
  .title2{
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
  }
  .title3{
    font-size: 1.4rem;
    font-weight: 400;
    margin: 2rem 0 1.6rem 0;
  }
  .remark{
    border: 1px solid #E0E0E4;
    padding: 0.4rem 1rem!important;
    margin-bottom: 1.6rem;
  }
  ::v-deep .van-field__label{
    width: 10rem!important;
  }
  
  .van-button{
    font-size: 1.8rem;
    font-weight: 400;
  }
  .van-cell{
    border-bottom: 1px solid #E0E0E4;
    padding: 2rem 0 1.6rem;
  }
  ::v-deep .qiye-info .van-cell__title{
    width: 10rem !important;
    flex: none;
    margin-right: 1.2rem;
  }
  ::v-deep .van-field__label {
    font-size: 1.3rem;
  }
  
  ::v-deep .van-cell__title{
    width: 12rem !important;
    flex: none;
    margin-right: 1.2rem;
  }
  ::v-deep .van-cell__value{
    text-align: left;
    color: #323233;
    font-size: 1.3rem;
  }
  .add{
    width: 16%;
    height: 2.6rem;
    line-height: 2.5rem;
    margin: 0 auto;
    text-align: center;
    font-size: 2.2rem;
    position: absolute;
    bottom: -2.6rem;
    background: #fff;
    left: 42%;
  }
  .addapplybtn{
    text-align: center;
    margin: 2rem 0;
  }
  .apply{
    width: 8rem;
    height: 3.8rem;
    font-size: 1.6rem;
  }
  .talent-title{
    // font-size: 1.8rem;
    // font-weight: 700;
    margin: 0 1.2rem 1.5rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .titleinfo{
    font-size: 1.8rem;
    font-weight: 700;

  }
  .deletebtn{
    font-size: 1.6rem;
    font-weight: 400;
    color: red;

  }

  </style>